package com.lin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lin.mapper.MDesignProcedureDetailsMapper;
import com.lin.pojo.MDesignProcedureDetails;
import com.lin.pojo.PageVo;
import com.lin.service.MDesignProcedureDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MDesignProcedureDetailsServiceImpl extends ServiceImpl<MDesignProcedureDetailsMapper, MDesignProcedureDetails>
implements MDesignProcedureDetailsService {
    @Autowired
    MDesignProcedureDetailsMapper mDesignProcedureDetailsMapper;
    @Override
    public PageVo<MDesignProcedureDetails> queryallDetails(MDesignProcedureDetails mDesignProcedureDetails, int pageno, int pagesize) {
        Page<MDesignProcedureDetails> page=new Page<MDesignProcedureDetails>(pageno,pagesize);
        QueryWrapper<MDesignProcedureDetails> queryWrapper=new QueryWrapper<MDesignProcedureDetails>();

        Page<MDesignProcedureDetails> page1 = this.page(page,queryWrapper);

        PageVo<MDesignProcedureDetails> pageVo = new PageVo<MDesignProcedureDetails>();
        pageVo.setTotal(page1.getTotal());
        pageVo.setRows(page1.getRecords());

        return pageVo;

    }
}
